<?php 
	echo $html->css( 'jquery-ui-1.8.16.custom.css' );
	$javascript->link( array( 'jquery/jquery-1-6-4', 'jquery/jquery-ui-1.8.16.custom.min', 'teams/index' ), false );
?>


<h1>Mis Equipos</h1>

<div id="listTeams">
	<?php foreach( $listTeams as $listTeam ) : ?>
		<div class="team"  >
			<a onclick='return confirm("Estas seguro de que deseas eliminar este grupo ?")' class="deleteSchedule" href="delete/<?php echo $listTeam['Team']['id'] ?>" >x</a>
			<?php echo $html->image( 'team.png' ); ?>
			<p><b><a title="<?php echo $listTeam['Team']['description'] ?>" href="edit/<?php echo $listTeam['Team']['id'] ?>"><?php echo $listTeam['Team']['name'] ?></a></b></p>
		</div>
	<?php endforeach; ?>

	<div class="clear"></div>
</div>

<a href="#" id="showAddDialog" >Crear Grupo</a>

<div style="display:none;" id="addTeamDialog" title="Nuevo Equipo">
	<?php
		echo $form -> create('Team', array( 'action' => 'add' ));
		echo $form -> input('name');
		echo $form -> input('description');
		echo $form -> end('Salvar');
	?>
</div>